<template>
	<view class="webview">
		<web-view :src="weburl"></web-view>
	</view>
</template>

<script>
	import {
		getList,
	} from '@/api/motortime.js';
	let app = getApp()
	export default {
		data() {
			return {
				weburl: ''
			};
		},
		onShow() {
			if (uni.getStorageSync('onload')) {
				this.weburl = this.weburl + "?token=" + uni.getStorageSync('access_token') + "&source=26" + "&userid=" +
					uni
					.getStorageSync('member').id
				uni.removeStorage({
					key: 'onload'
				})
			}
		},
		onLoad(options) {
			this.weburl = decodeURIComponent(options.scene)
			if (uni.getStorageSync('access_token')) {
				this.weburl = weburl + "?token=" + uni.getStorageSync('access_token') + "&source=26" + "&userid=" + uni
					.getStorageSync('member').id
			} else {
				uni.navigateTo({
					url: '/pages/login/login'
				})
			}
		},
		methods: {},
		onShareAppMessage(res) {
			app.getShareTask()
			return {

			}
		}
	}
</script>

<style lang="scss">

</style>